package com.study.springcloud.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.study.springcloud.database.DataBase;
import com.study.springcloud.entites.Payment;
import com.study.springcloud.service.PaymentService;

@Service
public class PaymentServiceImpl implements PaymentService {

    // @Resource
    // private PaymentDao paymentDao;]
    @Autowired
    private DataBase dataBase;

    public int create(Payment payment) {
        dataBase.putData(payment);
        return 1;
    }

    public Payment getPaymentById(String id) {
        return (Payment) dataBase.getData(id,Payment.class);
    }
}
